package org.example.proxy.dynamicProxy;

import org.example.proxy.normalProxy.GamePlayer;
import org.example.proxy.normalProxy.GamePlayerProxy;
import org.example.proxy.normalProxy.IGamePlayer;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class Client {

    public static void main(String[] args) throws Exception {
//        IGamePlayer player=new GamePlayer("张三");
//        InvocationHandler handler=new GamePlayIH(player);
//
//        ClassLoader cl = player.getClass().getClassLoader();
//
//        IGamePlayer proxy = (IGamePlayer)Proxy.newProxyInstance(cl, player.getClass().getInterfaces(), handler);
//        proxy.login("dd","ss");
//        proxy.killBoss();
//        player.upgrade();
    }
}
